<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Cencat SaaS 系统 - API 文档门户</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 20px;
        }

        .container {
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(10px);
            border-radius: 20px;
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
            padding: 40px;
            max-width: 1200px;
            width: 100%;
            animation: fadeInUp 0.8s ease-out;
        }

        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(30px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .header {
            text-align: center;
            margin-bottom: 40px;
        }

        .header h1 {
            color: #2c3e50;
            font-size: 2.5rem;
            font-weight: 700;
            margin-bottom: 10px;
            background: linear-gradient(135deg, #667eea, #764ba2);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        .header p {
            color: #7f8c8d;
            font-size: 1.1rem;
            margin-bottom: 20px;
        }

        .status-indicator {
            display: inline-flex;
            align-items: center;
            background: #e8f5e8;
            color: #27ae60;
            padding: 8px 16px;
            border-radius: 20px;
            font-size: 0.9rem;
            font-weight: 500;
        }

        .status-dot {
            width: 8px;
            height: 8px;
            background: #27ae60;
            border-radius: 50%;
            margin-right: 8px;
            animation: pulse 2s infinite;
        }

        @keyframes pulse {
            0% { opacity: 1; }
            50% { opacity: 0.5; }
            100% { opacity: 1; }
        }

        .modules-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
            gap: 25px;
            margin-bottom: 40px;
        }

        .module-card {
            background: #fff;
            border-radius: 15px;
            padding: 25px;
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
            transition: all 0.3s ease;
            border: 2px solid transparent;
            position: relative;
            overflow: hidden;
        }

        .module-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 4px;
            background: linear-gradient(90deg, #667eea, #764ba2);
        }

        .module-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
            border-color: #667eea;
        }

        .module-icon {
            width: 50px;
            height: 50px;
            background: linear-gradient(135deg, #667eea, #764ba2);
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 15px;
            font-size: 1.5rem;
            color: white;
        }

        .module-title {
            font-size: 1.3rem;
            font-weight: 600;
            color: #2c3e50;
            margin-bottom: 8px;
        }

        .module-description {
            color: #7f8c8d;
            font-size: 0.95rem;
            line-height: 1.5;
            margin-bottom: 20px;
        }

        .module-links {
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
        }

        .btn {
            padding: 8px 16px;
            border-radius: 8px;
            text-decoration: none;
            font-size: 0.9rem;
            font-weight: 500;
            transition: all 0.3s ease;
            display: inline-flex;
            align-items: center;
            gap: 5px;
        }

        .btn-primary {
            background: linear-gradient(135deg, #667eea, #764ba2);
            color: white;
        }

        .btn-primary:hover {
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
        }

        .btn-secondary {
            background: #ecf0f1;
            color: #2c3e50;
        }

        .btn-secondary:hover {
            background: #d5dbdb;
            transform: translateY(-2px);
        }

        .footer {
            text-align: center;
            padding-top: 30px;
            border-top: 1px solid #ecf0f1;
            color: #7f8c8d;
            font-size: 0.9rem;
        }

        .footer a {
            color: #667eea;
            text-decoration: none;
        }

        .footer a:hover {
            text-decoration: underline;
        }

        @media (max-width: 768px) {
            .container {
                padding: 20px;
            }
            
            .header h1 {
                font-size: 2rem;
            }
            
            .modules-grid {
                grid-template-columns: 1fr;
            }
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="header">
            <h1>🚀 Cencat SaaS 系统</h1>
            <p>固定商家场景多租户SaaS企业综合管理系统 API 文档门户</p>
            <div class="status-indicator">
                <div class="status-dot"></div>
                系统运行正常
            </div>
        </div>

        <div class="modules-grid">
            <div class="module-card">
                <div class="module-icon">👥</div>
                <div class="module-title">用户管理模块</div>
                <div class="module-description">
                    提供用户注册、登录、权限管理、角色管理等核心用户功能，支持多租户用户隔离。
                </div>
                <div class="module-links">
                    <a href="http://localhost:8084/user/swagger-ui/index.html" class="btn btn-primary" target="_blank">
                        📖 API 文档
                    </a>
                    <a href="http://localhost:8084/user/actuator/health" class="btn btn-secondary" target="_blank">
                        ❤️ 健康检查
                    </a>
                </div>
            </div>

            <div class="module-card">
                <div class="module-icon">📦</div>
                <div class="module-title">商品管理模块</div>
                <div class="module-description">
                    商品信息管理、分类管理、库存管理、价格管理等功能，支持批量操作和数据导入导出。
                </div>
                <div class="module-links">
                    <a href="http://localhost:8082/product/swagger-ui/index.html" class="btn btn-primary" target="_blank">
                        📖 API 文档
                    </a>
                    <a href="http://localhost:8082/product/actuator/health" class="btn btn-secondary" target="_blank">
                        ❤️ 健康检查
                    </a>
                </div>
            </div>

            <div class="module-card">
                <div class="module-icon">📋</div>
                <div class="module-title">订单管理模块</div>
                <div class="module-description">
                    订单创建、状态管理、支付处理、物流跟踪等完整的订单生命周期管理功能。
                </div>
                <div class="module-links">
                    <a href="http://localhost:8081/order/swagger-ui/index.html" class="btn btn-primary" target="_blank">
                        📖 API 文档
                    </a>
                    <a href="http://localhost:8081/order/actuator/health" class="btn btn-secondary" target="_blank">
                        ❤️ 健康检查
                    </a>
                </div>
            </div>

            <div class="module-card">
                <div class="module-icon">🏪</div>
                <div class="module-title">商家管理模块</div>
                <div class="module-description">
                    商家入驻、审核管理、商家信息维护、等级管理等功能，支持多租户商家管理。
                </div>
                <div class="module-links">
                    <a href="http://localhost:8083/merchant/swagger-ui/index.html" class="btn btn-primary" target="_blank">
                        📖 API 文档
                    </a>
                    <a href="http://localhost:8083/merchant/actuator/health" class="btn btn-secondary" target="_blank">
                        ❤️ 健康检查
                    </a>
                </div>
            </div>
        </div>

        <div class="footer">
            <p>
                © 2024 Cencat SaaS 系统 | 
                <a href="https://github.com/cencat" target="_blank">GitHub</a> | 
                <a href="mailto:cencat@example.com">联系我们</a>
            </p>
            <p style="margin-top: 10px; font-size: 0.8rem;">
                版本: v1.0.0 | 最后更新: 2024-01-15 | 开发者: cencat
            </p>
        </div>
    </div>

    <script>
        // 检查服务状态
        async function checkServiceStatus() {
            const services = [
                { name: '用户服务', url: 'http://localhost:8084/user/actuator/health' },
                { name: '商品服务', url: 'http://localhost:8082/product/actuator/health' },
                { name: '订单服务', url: 'http://localhost:8081/order/actuator/health' },
                { name: '商家服务', url: 'http://localhost:8083/merchant/actuator/health' }
            ];

            // 这里可以添加实际的健康检查逻辑
            console.log('API文档门户已加载，可以访问各模块的Swagger文档');
        }

        // 页面加载完成后检查服务状态
        document.addEventListener('DOMContentLoaded', checkServiceStatus);

        // 添加点击统计
        document.querySelectorAll('.btn-primary').forEach(btn => {
            btn.addEventListener('click', function() {
                console.log(`访问API文档: ${this.href}`);
            });
        });
    </script>
</body>
</html>